/**
*** @title：工程路由文件
*** @author：lupan
*** @desc：
*** @date：2019-09-17 14:20:06
**/
import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)
export default new Router({
  routes: [{
    path: '/',
    title: '主体',
    redirect: '/home',
    hidden: true,
    component: resolve => require(['@pages/main'], resolve),
    children: [{
      path: '/home',
      title: '主页',
      icon: 'iconshouye',
      hidden: false,
      component: resolve => require(['@pages/main/home'], resolve)
    }, {
      path: '/statistics',
      redirect: '/statistics/statistics1',
      title: '统计报表',
      icon: 'iconbaobiao',
      hidden: false,
      component: resolve => require(['@pages/main/statistics'], resolve),
      children: [{
        path: 'statistics1',
        title: '用能侧',
        hidden: false,
        component: resolve => require(['@pages/main/statistics/statistics1.vue'], resolve)
      }, {
        path: 'statistics2',
        title: '供能侧',
        hidden: false,
        component: resolve => require(['@pages/main/statistics/statistics2.vue'], resolve)
      }, 
      // {
      //   path: 'statistics3',
      //   title: '系统指标',
      //   hidden: false,
      //   component: resolve => require(['@pages/main/statistics/statistics3.vue'], resolve)
      // }
    ]
    }, {
      path: '/analysis',
      title: '分析图表',
      icon: 'icontubiao',
      redirect: '/analysis/analysis1',
      hidden: false,
      component: resolve => require(['@pages/main/analysis'], resolve),
      children: [{
        path: 'analysis1',
        title: '园区能源总览',
        hidden: false,
        component: resolve => require(['@pages/main/analysis/analysis1.vue'], resolve)
      }, {
        path: 'analysis2',
        title: '建筑用能分析',
        hidden: false,
        component: resolve => require(['@pages/main/analysis/analysis2.vue'], resolve)
      }, {
        path: 'analysis3',
        title: '设备供能分析',
        hidden: false,
        component: resolve => require(['@pages/main/analysis/analysis3.vue'], resolve)
      }]
    }, {
      path: '/scheduling',
      title: '智能调度',
      icon: 'icontiaodu',
      hidden: false,
      component: resolve => require(['@pages/main/scheduling'], resolve)
    }, {
      path: '/system',
      title: '系统管理',
      icon: 'iconxitongguanli',
      redirect: '/system/log',
      hidden: false,
      component: resolve => require(['@pages/main/system'], resolve),
      children: [ {
        path: 'log',
        title: '系统日志',
        hidden: false,
        component: resolve => require(['@pages/main/system/log.vue'], resolve)
      }, {
        path: 'entry',
        title: '数据录入',
        hidden: false,
        component: resolve => require(['@pages/main/system/entry.vue'], resolve)
      }, {
        path: 'about',
        title: '关于系统',
        hidden: false,
        component: resolve => require(['@pages/main/system/about.vue'], resolve)
      }
    ]
    }]
  }, { // 登录页面
    path: '/login',
    name: 'login',
    title: '登录',
    hidden: true,
    component: resolve => require(['@pages/login'], resolve)
  }]
})
